package pojo;

import java.util.Collection;
import java.util.Objects;

public class TbBrand {
    private Integer brandId;
    private String brandName;
    private Collection<TbPhone> tbPhonesByBrandId;

    public Integer getBrandId() {
        return brandId;
    }

    public void setBrandId(Integer brandId) {
        this.brandId = brandId;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbBrand tbBrand = (TbBrand) o;
        return Objects.equals(brandId, tbBrand.brandId) &&
                Objects.equals(brandName, tbBrand.brandName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(brandId, brandName);
    }

    public Collection<TbPhone> getTbPhonesByBrandId() {
        return tbPhonesByBrandId;
    }

    public void setTbPhonesByBrandId(Collection<TbPhone> tbPhonesByBrandId) {
        this.tbPhonesByBrandId = tbPhonesByBrandId;
    }
}
